@inherits umbraco.MacroEngines.DynamicNodeContext

 @{
        //var currentUser =  System.Web.HttpContext.Current.User.Identity.IsAuthenticated;
        HttpCookie authCookie = Request.Cookies[FormsAuthentication.FormsCookieName];
        if (authCookie != null)
        {
            FormsAuthenticationTicket ticket = FormsAuthentication.Decrypt(authCookie.Value);
            var currentUser = ticket.Name;
            
            if (string.IsNullOrEmpty(currentUser))
            {
                Response.Redirect("/login.aspx");
            }
            
            if (Session["Role"] == null)
            {
                Response.Redirect("/login.aspx");
            }
        }
        
        
    }

